//
//  UUKeeperManager.h
//  UUCharterSupplier
//
//  Created by ZhangAo on 24/01/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import <UUFoundation/DKBaseManager.h>
#import "UUKeeperModel.h"

@protocol UUKeeperManagerObserver

@optional

// 管理员增量更新
- (void)keeperManagerDidUpdateKeepers;

// 当前用户的管理员信息更新（非角色）
- (void)keeperManagerDidupdateCurrentUser;

@end

#define GetKeeperManager()      ([UUKeeperManager sharedInstance])

@interface UUKeeperManager : DKBaseManager

// 增量更新
- (void)asyncUpdateKeepers;

- (NSArray<id> *)fetchKeepers;

- (UUKeeperModel *)fetchKeeperWithKeeperId:(id)keeperId;

// 添加管理员
- (void)asyncAddKeeperWithName:(NSString *)name
                        mobile:(NSString *)mobile
                      fleetIds:(NSString *)fleetIds
                        roleId:(UUPermissionRoleType)roleId
                 completeBlock:(void (^)(NSError *error))completeBlock;

// 更新管理员
- (void)asyncUpdateKeeperWithKeeperId:(id)keeperId
                                 name:(NSString *)name
                               mobile:(NSString *)mobile
                             fleetIds:(NSString *)fleetIds
                               roleId:(UUPermissionRoleType)roleId
                        completeBlock:(void (^)(NSError *error))completeBlock;

// 删除管理员
- (void)asyncDeleteKeeperWithKeeperId:(NSNumber *)keeperId
                           verifyCode:(NSString *)verifyCode
                        completeBlock:(void (^)(NSError *error))completeBlock;

// 发送解绑验证码
- (void)asyncSendUnbundingVerifyCodeWithCompleteBlock:(void (^)(NSString *mobile, NSError *error))completeBlock;

@end
